<div class="ads-1">
	<?php
			$touradv = db_get_list_post_in_post_type_nopage_metakey(1, 'adv', 'date', 'DESC', $wpdb->prefix.'adv_footer', 'display');
			query_posts($touradv);
			if(have_posts())
			{
				the_post();
				$postID = get_the_ID();
				$title = get_the_title();
				$alt = db_vietnamese_slug($title);
				$perlink = get_post_meta($postID, $wpdb->prefix.'url',true);
				if(!$perlink)
					$perlink = get_permalink();
				$thumbnail = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
				?>
				 	<a href="<?php echo $perlink;?>" title="<?php echo $title;?>"><img alt="<?php echo $alt;?>" src="<?php echo $thumbnail;?>" /></a>
				<?php 	
			} 
	?> 	
</div>